/**********************************************************************************
 * Copyright (c) 2012 - 2012,  ObjectPoolLite, All right reserved
 * Title: com.adc.litepool.impl  StackObjectPoolHandlerFactory.java 
 * @author shen  shenqiao2012@163.com 
 *  2012-7-31 下午2:38:41 
 *********************************************************************************/


package com.adc.litepool.impl;

import com.adc.litepool.ObjectPoolHandlerFactory;
import com.adc.litepool.ObjectPoolHandler;
import com.adc.litepool.PoolableObjectFactory;



public class StackObjectPoolHandlerFactory implements ObjectPoolHandlerFactory {

	/** 单例 */  
    private static StackObjectPoolHandlerFactory instance = null;  
  
    /** 
     * 单例模式 
     *  
     * @return 栈式对象池工厂的单例 
     */  
    public static StackObjectPoolHandlerFactory getInstance(){  
        if (null == instance) {  
            instance = new StackObjectPoolHandlerFactory();  
        }  
  
        return instance;  
    }  
	/**
	 * Description:  
	 * @see com.adc.litepool.ObjectPoolHandlerFactory#createPool(com.adc.litepool.PoolableObjectFactory, int, java.lang.Class) 
	 */
	@Override
	public ObjectPoolHandler createPool(PoolableObjectFactory factory, int maxNum, Class<?> clsType) {
		// TODO Auto-generated method stub
		 return new StackObjectPoolHandler(factory, maxNum, clsType);  
	}

}
